home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19970104-19970326
/
000352_news@columbia.edu _Tue Mar 4 19:22:51 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA08260
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 4 Mar 1997 19:22:50 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA15117
for kermit.misc@watsun; Tue, 4 Mar 1997 19:22:49 -0500 (EST)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: UNIXLOGIN script???
Date: 5 Mar 1997 00:22:48 GMT
Organization: Columbia University
Lines: 33
Message-ID: <5fieco$lrh$1@apakabar.cc.columbia.edu>
References: <331C9505.26B0@voice-tel.com>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:6689
In article <331C9505.26B0@voice-tel.com>,
Nassif T Nassif <nnassif@voice-tel.com> wrote:
: I am trying to write a script to login to a unix machine: I am using the
: unixlogin in "C-kermit" book page 436. In the book example, the part to
: output the password was omitted but it is fixed in the ckermit.ini file.
:
Good catch -- nobody noticed this before. Oops!
: If I include the macros (NET and UNIXLOGIN) in a script, I was able to
: login, but then the script will exit from the remote host immediately
: after I would get the prompt. I want to be able to login and then
: transfer the control to the user (i.e the keyboard) so whewnever the
: user execute the script he should not worry about login and password.
: here is my code:
: #!/l1/ntn/dev01/kermit/kermit
:
: take /l1/ntn/dev01/kermit/ckermit.ini ;ini where macros are defined
: NET tcp 193.254.220.1
: UNIXLOGIN my_usrid mypasswd
: hangup
: exit 0
:
But of course -- you have a HANGUP and an EXIT command in your script.
Do it like this:
take /l1/ntn/dev01/kermit/ckermit.ini ;ini where macros are defined
NET tcp 193.254.220.1
if fail stop 1 Can't make connection
UNIXLOGIN my_usrid mypasswd
if fail stop 1 Login failed
connect
- Frank